<?php

class Application_Form_Categorys extends Zend_Form
{
    public function init()
    {
        $this->setName('Categorys');

        $category_id = new Zend_Form_Element_Hidden('category_id');
        $category_id->addFilter('Int');

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('name')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
        
             
        $slug = new Zend_Form_Element_Text('slug');
        $slug->setLabel('slug')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
               
               
               
        $left_id = new Zend_Form_Element_Text('left_id');
        $left_id->setLabel('left_id')
        					  ->addFilter('Int');

        $right_id = new Zend_Form_Element_Text('right_id');
        $right_id->setLabel('right_id')
        					  ->addFilter('Int');
        					  
        $parent_id = new Zend_Form_Element_Text('parent_id');
        $parent_id->setLabel('parent_id')
        					  ->addFilter('Int');
        					  
        $num_views = new Zend_Form_Element_Text('num_views');
        $num_views->setLabel('num_views')
        					  ->addFilter('Int');
        					  
        $user_id = new Zend_Form_Element_Text('user_id');
        $user_id->setLabel('user_id')
        					  ->addFilter('Int');
        					  
        $is_active = new Zend_Form_Element_Text('is_active');
        $is_active->setLabel('is_active')
        					  ->addFilter('Int');
       

        $created_date = new Zend_Form_Element_Text('created_date');
        $created_date->setLabel('created_date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $modified_date = new Zend_Form_Element_Text('modified_date');
        $modified_date->setLabel('modified_date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
        $language = new Zend_Form_Element_Text('language');
        $language->setLabel('language')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
        					  
        $meta = new Zend_Form_Element_Text('meta');
        $meta->setLabel('Meta')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');

        $this->addElements(array($category_id, $name, $slug, $meta, $left_id, $right_id, $parent_id, $num_views, $is_active, $created_date, $modified_date, $user_id, $language, $submit));
    }
}